import { Request, Response } from 'express';

const waitTime = (time: number = 100) => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve(true);
    }, time);
  });
};

export default {
  // 'GET /api/service/current/user': async (req: Request, res: Response) => {
  //   // await waitTime(2000)
  //   return res.status(200).send(
  //     { 
  //       code: 200, 
  //       message: "userInfo", 
  //       data: {
  //         access: [],
  //         head_image: "https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png",
  //         nickname: "langengel",
  //         service_logo: "",
  //         service_name: "hoonmao",
  //         sex: 1,
  //         is_admin: true
  //       } 
  //     })
  // },
  'GET /api/user/outLogin': async (req: Request, res: Response) => {
    return res.status(200).send(
      { 
        code: 200, 
        message: "outLogin", 
        data: []
      })
  },

  // 'POST /api/user/get/services': async (req: Request, res: Response) => {
  //   return res.status(200).send(
  //     {
  //       code: 200,
  //       message: "services",
  //       data: [
  //         { username: "zhou", u_id: "80000000001", service_name: "redhat", s_id: "10000000001", is_main: true },
  //         { username: "zhoushifu", u_id: "80000000002", service_name: "hoonmao", s_id: "10000000002", is_main: false },
  //         { username: "温科枝", u_id: "80000000003", service_name: "森文", s_id: "10000000003", is_main: true },
  //         { username: "金总", u_id: "80000000004", service_name: "帝宇", s_id: "10000000004", is_main: false },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000005", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000006", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000007", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000008", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000009", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000010", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000011", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000012", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000013", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000014", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000015", is_main: true },
  //         { username: "水鱼", u_id: "80000000005", service_name: "叁牛", s_id: "10000000016", is_main: true },
  //       ]
  //     })
  // },

  // 'POST /api/user/service/login': async (req: Request, res: Response) => {
  //   return res.status(200).send({
  //     code: 200,
  //     message: "登陆成功",
  //     data: {
  //       access_token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyaW5mbyI6eyJ1c2VyIjo1LCJ0eXBlIjp0cnVlLCJzZXJ2aWNlIjo1fSwicGVybWlzc2lvbnMiOltdLCJleHAiOjE2MTUxMTYxNzh9.qasDmHVSCq-Bw_ZVHnAI94Bjw1w_5yBNocRRLhSRDmc",
  //       expires_in: 120,
  //       token_type: "bearer",
  //     }
  //   })
  // },
  // 'POST /api/user/account/check': async (req: Request, res: Response) => {
  //   return res.status(200).send({
  //     code: 200,
  //     message: "验证通过",
  //     data: {
  //       web_code: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
  //     }
  //   })
  // },
}

